#ifndef SERIAL_H
#define SERIAL_H

#include <string>
#include <QThread>

class SerialDetails;

class Serial : public QThread
{
    Q_OBJECT
public:
    Serial(std::string port, unsigned int baud_rate = 9600, QObject *parent = 0);
    void writeString(std::string s);
    std::string readLine();

    void run();
signals:
    void message(QString);

public slots:


private:
    SerialDetails* details;
    bool m_running;
    int m_counter;
};

#endif // SERIAL_H

